package edison.persistence;

import javax.jcr.nodetype.NodeDefinition;
import javax.jcr.nodetype.NodeType;
import javax.jcr.nodetype.NodeTypeDefinition;
import javax.jcr.nodetype.NodeTypeIterator;
import javax.jcr.nodetype.PropertyDefinition;

public interface NodetypeService {

	public NodeType createOrUpdateNodeType(NodeTypeDefinition nodeTypeDefinition) throws PersistenceException;

	public void deleteNodeType(String nodeDefinitionName) throws PersistenceException;

	public NodeTypeIterator createOrUpdateNodeTypes(NodeTypeDefinition[] nodeTypeDefinitions) throws PersistenceException;

	public NodeTypeDefinition getNodeTypeByName(String nodeTypeName) throws PersistenceException;

	public boolean hasNodeType(String nodeTypeName) throws PersistenceException;

	public NodeTypeIterator getAllNodeTypes() throws PersistenceException;

	public NodeTypeIterator getPrimaryNodeTypes() throws PersistenceException;

	public NodeTypeIterator getMixinNodeTypes() throws PersistenceException;

	public boolean nodeTypeExsits(String nodeTypeName) throws PersistenceException;

	public NodeType getNodeType(String nodeTypeName) throws PersistenceException;

	public NodeType[] getNodeTypes(String[] nodeTypeNames) throws PersistenceException;

	public boolean isSuperTypeOf(String superTypeName, String subTypeName) throws PersistenceException;

	public NodeType[] getSupertypeNames(String nodeTypeName) throws PersistenceException;

	public NodeType[] getDeclaredSupertypes(String nodeTypeName) throws PersistenceException;

	public NodeTypeIterator getSubtypeNames(String nodeTypeName) throws PersistenceException;

	public NodeTypeIterator getDeclaredSubtypeNames(String nodeTypeName) throws PersistenceException;

	public NodeDefinition[] getChildNodeDefinitions(String nodeTypeName) throws PersistenceException;

	public PropertyDefinition[] getPropertyDefinitions(String nodeTypeName) throws PersistenceException;

	public NodeDefinition[] getDeclaredNodeDefinitions(String nodeTypeName) throws PersistenceException;

	public PropertyDefinition[] getDeclaredPropertyDefinitions(String nodeTypeName) throws PersistenceException;

	public PropertyDefinition getPropertyDefinition(String nodeTypeName, String propertyName) throws PersistenceException;

}
